ci: push monthly output to main via app-token bypass#11
Merged
Conversation
The required-PR ruleset on main blocks the built-in GITHUB_TOKEN. Mint a maps-lab-ci-bot app token immediately before the push (app tokens live 1h; the pipeline loop can run for hours) and push as the app, which is a ruleset bypass actor.
There was a problem hiding this comment.
Pull request overview
Updates the monthly refresh workflow to push generated output/ data directly to main using a GitHub App installation token, enabling bypass of the upcoming required-PR ruleset for automated monthly updates.
Changes:
- Mint a short-lived GitHub App token immediately before the
mainpush. - Switch the
mainpush to authenticate as the App (ruleset bypass actor) instead of usingGITHUB_TOKEN.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+184
to
+188
| # Fresh token minted here (not at checkout): the pipeline loop can run for | ||
| # hours and an app token lives only 1h, so mint it immediately before the push. | ||
| - name: Generate push token | ||
| id: push_token | ||
| uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2.2.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prep for the required-PR ruleset on
main. Mints a short-livedmaps-lab-ci-botapp token right before the monthly commit-to-main push (app tokens expire in 1h, the pipeline loop can run hours) and pushes as the App — a ruleset bypass actor. The built-inGITHUB_TOKENcannot bypass a required-PR rule. Cache push todata-cacheis unchanged (that branch isn't protected).